package com.fh.wanandroid.ui.mainpager.adaper;

import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.cardview.widget.CardView;
import androidx.recyclerview.widget.RecyclerView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.fh.wanandroid.R;
import com.fh.wanandroid.ui.mainpager.bean.FeedArticleListData;

import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

public class ArticleAdaper extends BaseQuickAdapter<FeedArticleListData.DataBean.DatasBean, MyViewHolder> {


    public ArticleAdaper(int layoutResId, @Nullable List<FeedArticleListData.DataBean.DatasBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(@NonNull MyViewHolder helper, FeedArticleListData.DataBean.DatasBean item) {

        helper.itemMainPagerAuthor.setText(item.getAuthor());
        helper.itemMainPagerChapterName.setText(item.getSuperChapterName()+"/"+item.getChapterName());
        helper.itemMainPagerTitle.setText(item.getTitle());
        helper.itemMainPagerNiceDate.setText(item.getNiceDate());

        helper.addOnClickListener(R.id.item_main_pager_group);

    }



}
